package com.hpeng.sys.model;

import java.math.BigDecimal;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

@Entity
@Table(name = "DEPARTMENT")
public class Department implements java.io.Serializable {

	private static final long serialVersionUID = 1L;
	private String depid;
	private String depname;
	private String depparentid;
	private String depsimplename;
	private String depstatus;
	private BigDecimal seq;
	private Set<Staff> staffs = new HashSet<Staff>(0);

	public Department() {
	}

	@Id
	@Column(name = "DEPID")
	public String getDepid() {
		return this.depid;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "department")
	public Set<Staff> getStaffs() {
		return this.staffs;
	}

	public void setStaffs(Set<Staff> staffs) {
		this.staffs = staffs;
	}

	public void setDepid(String depid) {
		this.depid = depid;
	}

	@Column(name = "DEPNAME", length = 50)
	public String getDepname() {
		return this.depname;
	}

	public void setDepname(String depname) {
		this.depname = depname;
	}

	@Column(name = "DEPPARENTID", length = 20)
	public String getDepparentid() {
		return this.depparentid;
	}

	public void setDepparentid(String depparentid) {
		this.depparentid = depparentid;
	}

	@Column(name = "DEPSIMPLENAME", length = 30)
	public String getDepsimplename() {
		return this.depsimplename;
	}

	public void setDepsimplename(String depsimplename) {
		this.depsimplename = depsimplename;
	}

	@Column(name = "STATUS")
	public String getDepstatus() {
		return this.depstatus;
	}

	public void setDepstatus(String depstatus) {
		this.depstatus = depstatus;
	}

	@Column(name = "SEQ", precision = 22, scale = 0)
	public BigDecimal getSeq() {
		return this.seq;
	}

	public void setSeq(BigDecimal seq) {
		this.seq = seq;
	}

}